import React, { Component, PropTypes } from 'react'
import Immutable from 'Immutable'
import pureRender from "pure-render-decorator"


@pureRender
export default class DefaultSelect  extends Component {
  render() {
    const {options,onChange,label,name,className} = this.props
    return (
      <section className="default-select {className}">
        <span>{label}</span>
        <select  name={name} onChange={onChange}>
          {options.map((option)=>(

            <option key={option.get("id")} value={option.get("id")}> {option.get("name")}</option>
          ))}
        </select>
      </section>
    )
  }
}
// DefaultSelect.PropTypes={
//   options:React.PropTypes.instanceOf(Immutable.List).isRequired
// }
